package com.zq.learn.springbatch.mongo.sourcedata;

import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * SourceData
 * 原数据
 * @author ZhangQi
 * @date 2020/2/13
 */
@Document(collection = "SourceData")
public class SourceData {
  @Indexed
  private String id;
  private Integer price;
  private String timestamp;
  private Integer status;

  public SourceData(){}

  public SourceData(String id, Integer price, String timestamp, Integer status) {
    this.id = id;
    this.price = price;
    this.timestamp = timestamp;
    this.status = status;
  }

  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

  public Integer getPrice() {
    return price;
  }

  public void setPrice(Integer price) {
    this.price = price;
  }

  public String getTimestamp() {
    return timestamp;
  }

  public void setTimestamp(String timestamp) {
    this.timestamp = timestamp;
  }

  public Integer getStatus() {
    return status;
  }

  public void setStatus(Integer status) {
    this.status = status;
  }

  @Override public String toString() {
    return "SourceData{" + "id='" + id + '\'' + ", price=" + price + ", timestamp='" + timestamp
      + '\'' + ", status=" + status + '}';
  }
}
